home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 April / CICA MS Windows - April 1993.iso / unzipped / programr / tp / tpwmi2 / bwccowl.pas next >
Pascal/Delphi Source File  |  1992-08-03  |  2KB  |  106 lines

  1. unit BWCCOwl;
  2.  
  3. interface
  4.  
  5. uses WinTypes,WObjects,BWCC;
  6.  
  7. type
  8.     PBDialog = ^TBDialog;
  9.     TBDialog = object(TDialog)
  10.         function GetClassName: PChar; virtual;
  11.     end;
  12.  
  13.     PBCheckBox = ^TBCheckBox;
  14.     TBCheckBox = object(TCheckBox)
  15.         function GetClassName: PChar; virtual;
  16.     end;
  17.  
  18.     PBRadioButton = ^TBRadioButton;
  19.     TBRadioButton = object(TRadioButton)
  20.         function GetClassName: PChar; virtual;
  21.     end;
  22.  
  23.     PBButton = ^TBButton;
  24.     TBButton = object(TButton)
  25.         function GetClassName: PChar; virtual;
  26.     end;
  27.  
  28.     PBStatic = ^TBStatic;
  29.     TBStatic = object(TStatic)
  30.         function GetClassName: PChar; virtual;
  31.     end;
  32.  
  33.     PBGroupBox = ^TBGroupBox;
  34.     TBGroupBox = object(TGroupBox)
  35.         constructor Init(AParent:PWindowsObject; AnID:integer; AText:PChar;
  36.             X,Y,W,H:integer);
  37.         function GetClassName: PChar; virtual;
  38.     end;
  39.  
  40.     PBDivider = ^TBDivider;
  41.     TBDivider = object(TControl)
  42.         constructor Init(AParent:PWindowsObject; AnID:integer; AText:PChar;
  43.             X,Y,W,H:integer;IsVertical,IsBump:boolean);
  44.         function GetClassName: PChar; virtual;
  45.     end;
  46.  
  47. implementation
  48.  
  49. function TBDialog.GetClassName:PChar;
  50. begin
  51.     GetClassName:=BorDlgClass;
  52. end;
  53.  
  54. function TBCheckBox.GetClassName:PChar;
  55. begin
  56.     GetClassName:=Check_Class;
  57. end;
  58.  
  59. function TBRadioButton.GetClassName:PChar;
  60. begin
  61.     GetClassName:=Radio_Class;
  62. end;
  63.  
  64. function TBButton.GetClassName:PChar;
  65. begin
  66.     GetClassName:=Button_Class;
  67. end;
  68.  
  69. function TBStatic.GetClassName:PChar;
  70. begin
  71.     GetClassName:=Static_Class;
  72. end;
  73.  
  74. constructor TBGroupBox.Init(AParent:PWindowsObject; AnID:integer; AText:PChar;
  75.         X,Y,W,H:integer);
  76. begin
  77.     TGroupBox.Init(AParent,AnID,AText,X,Y,W,H);
  78.     Attr.Style:=Attr.Style and not bs_GroupBox;
  79.     Attr.Style:=Attr.Style or bss_Group;
  80. end;
  81.  
  82. function TBGroupBox.GetClassName:PChar;
  83. begin
  84.     GetClassName:=Shade_Class;
  85. end;
  86.  
  87. constructor TBDivider.Init(AParent:PWindowsObject; AnID:integer; AText:PChar;
  88.             X,Y,W,H:integer;IsVertical,IsBump:boolean);
  89. begin
  90.     TControl.Init(AParent,AnID,AText,X,Y,W,H);
  91.     Attr.Style:=Attr.Style and not bs_GroupBox;
  92.     if IsVertical and IsBump then Attr.Style:=Attr.Style or bss_Vbump;
  93.     if (not IsVertical) and IsBump then Attr.Style:=Attr.Style or bss_Hbump;
  94.     if IsVertical and (not IsBump) then Attr.Style:=Attr.Style or bss_Vdip;
  95.     if (not IsVertical) and (not IsBump) then Attr.Style:=Attr.Style or bss_Hdip;
  96. end;
  97.  
  98. function TBDivider.GetClassName: PChar;
  99. begin
  100.     GetClassName:=Shade_Class;
  101. end;
  102.  
  103.  
  104.  
  105. end.
  106.